#include "Frm09.h"

Frm09::Frm09(HmiApp* app, STTWidget *par, const string& id, const string& desc) : STTPage(app->getRuntime(), par, id, desc) {
	hmiApp = app;
}

Frm09::~Frm09() {
}

void Frm09::onInit() {

}

void Frm09::createParts() {
	setMainArg(0, 0, 1024, 600);
	setMainStyle(0, 0xffffff, 0xffffff, 0, 255, 0, 0xc0c0c0);

	/*----------------------------- MButton : wMMButton1                 -----------------------------*/
	wMMButton1 = new STTButton(p_rt, this, "wMMButton1", 1);
	wMMButton1->setMainArg(0, 0, 93, 97, false);
	wMMButton1->setImg("1", "./images/arrow_34_93X97.gray.svg", "");
	wMMButton1->setImg("0", "./images/arrow_34_93X97.svg", "");
	wMMButton1->bindOpenFormHandler(Event::CLICKED, "Frm01", PageMode::NEWWIN, NULL);

	/*----------------------------- Video : wMVideo1                     -----------------------------*/
	wMVideo1 = new STTFFmpeg(p_rt, this, "wMVideo1");
	wMVideo1->channel = 0;
	wMVideo1->setRotate(0);
#if __arm__
	wMVideo1->setMainArg(111, 96, 800, 444, 640, 480, 30, "/dev/video0");
#else
	wMVideo1->setMainArg(111, 96, 800, 444, 640, 480, 30, "video=Integrated Camera");
#endif
	wMVideo1->play(300);
	wMVideo1->setAutoRestart(true);

	/*called after widget created.*/

	return; //createParts END
}

void Frm09::onLoad() {

}

bool Frm09::onClosing() {
	return true;
}

void Frm09::onDispose() {

}

